// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
import QtQuick 1.1
import com.nokia.symbian 1.1




Rectangle {
    width: parent.width
    height: 65

    anchors.bottom: parent.bottom

    property alias favorisVisible : favoris.visible
    property alias historiqueVisible: historique.visible


    gradient: Gradient {
        GradientStop {
            position: 0
            color: "#ebf1f6"
        }

        GradientStop {
            position: 1
            color: "#19a825"
        }
    }

    ContextMenu {
        id: mainMenu
        MenuLayout {
            MenuItem {
                text: "A propos de l'application"
                onClicked: pageStack.push(Qt.resolvedUrl("AboutPage.qml"))
            }
            MenuItem {
                text: "Guide d'utilisation"
            }
            MenuItem {
                text: "Quitter"
                onClicked: Qt.quit()
            }


        }
    }

    ToolButton {
        anchors.left: parent.left
        anchors.verticalCenter: parent.verticalCenter
        flat: true
        //iconSource: "toolbar-back"
        iconSource: "icon/back.png"
        //onClicked: pageStack.depth <= 1 ? Qt.quit() : pageStack.pop()
        onClicked: pageStack.pop()
    }

    ToolButton {
        id: menu
        flat: true

        //width: parent.width / 4
        anchors.right: parent.right
        anchors.verticalCenter: parent.verticalCenter
        //iconSource: "toolbar-menu"
        iconSource: "icon/options.png"
        onClicked: mainMenu.open()
    }

    ButtonRow {
        //anchors.right: menu.right
        anchors.rightMargin: 30
        anchors.verticalCenter: parent.verticalCenter
        anchors.centerIn: parent
        height: parent.height
        width: 250



        TabButton
        {
            id: favoris
            //                flat: true
            //                //width: parent.width / 4
            //                anchors.left: recherche.right
            //                anchors.verticalCenter: parent.verticalCenter
            //                iconSource: "toolbar-menu"
            onClicked: pageStack.push(Qt.resolvedUrl("Favoris.qml"))

            text: "Favoris"

        }

        TabButton
        {
            id: historique
            // flat: true
            //width: parent.width / 4
            //                anchors.left: favoris.right
            //                anchors.verticalCenter: parent.verticalCenter
            //                iconSource: "toolbar-menu"
            onClicked: pageStack.push(Qt.resolvedUrl("Historique.qml"))
            text: "Historique"
        }


    }

    Rectangle {
        color: "#48576B"
        width: parent.width
        height: 1
        anchors.top: parent.top

    }

}
